package com.mangosteen.interviewji.constant;

/**
 * Redis常量
 */
public interface RedisConstant {

    String USER_SIGN_IN_REDIS_KEY_PREFIX = "user:signIn";

    String USER_DAILY_ANSWER_REDIS_KEY_PREFIX = "user:dailyAnswer";

    static  String getUserSignInRedisKeyPrefix(int year,long userId){
        return String.format("%s:%s:%S",USER_SIGN_IN_REDIS_KEY_PREFIX,year,userId);
    }

    static String getUserDailyAnswerRedisKeyPrefix(Long userId,int year) {
        return String.format("%s:%s:%S", USER_DAILY_ANSWER_REDIS_KEY_PREFIX, year,userId);
    }
}
